/** 
 * 项目名称:Sprider-WebMagic-bak 
 * 文件名称:MaoYanSearchMoviePipeline.java 
 * 包名:com.xiaotu.spider.maoyan.pipeline 
 * 创建日期:2020年1月2日上午10:26:40 
 * Copyright (c) 2020, zxaiye1314@163.com All Rights Reserved.</pre> 
 */  
package com.xiaotu.spider.maoyan.pipeline;

import org.springframework.stereotype.Component;

import com.xiaotu.common.model.MaoYanSearchMovieModel;
import com.xiaotu.common.model.MaoYanAccountBoxModel;
import com.xiaotu.spider.APipeline;

import us.codecraft.webmagic.ResultItems;
import us.codecraft.webmagic.Task;

@Component("MaoYanAccountBoxPipeline")
public class MaoYanAccountBoxPipeline extends APipeline {

	@Override
	protected void doProcess(ResultItems resultItems, Task task) {
		
		MaoYanAccountBoxModel obj = resultItems.get(MaoYanAccountBoxModel.class.getName());
        if(null!=obj){
        	String key = "MAOYAN_ACCOUNT_BOX";
        	cacheHandler.hSet(key, obj.getDataid()+"_"+obj.getTvname(), obj);
        }
        
	}
	
	
	
}
